namespace ext.data
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// Ext.data.Api is a singleton designed to manage the data API including methods
	/// for validating a developer&apos;s DataProxy API. Defines variables for CRUD actions
	/// create, read, update and destroy in addition to a mapping of RESTful HTTP methods
	/// GET, POST, PUT and DELETE to CRUD actions.
	/// </summary>
	/// <definedin>src\data\Api.js</definedin>
	[ScriptName("Api")]
	[ScriptNamespace("Ext.data")]
	[Imported()]
	public partial class Api
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		internal Api()
		{
		}
		#endregion
		
		#region Properties
		/// <summary>
		/// Defined actions corresponding to remote actions:
		/// 
		/// actions: {
		/// create : &apos;create&apos;, // Text representing the remote-action to create records on server.
		/// read : &apos;read&apos;, // Text representing the remote-action to read/load data from server.
		/// update : &apos;update&apos;, // Text representing the remote-action to update records on server.
		/// destroy : &apos;destroy&apos; // Text representing the remote-action to destroy records on server.
		/// }
		/// </summary>
		/// <htmlSummary>
		/// Defined actions corresponding to remote actions:
		/// &lt;pre&gt;&lt;code&gt;
		/// actions: {
		/// create : &apos;create&apos;, // Text representing the remote-action to create records on server.
		/// read : &apos;read&apos;, // Text representing the remote-action to read/load data from server.
		/// update : &apos;update&apos;, // Text representing the remote-action to update records on server.
		/// destroy : &apos;destroy&apos; // Text representing the remote-action to destroy records on server.
		/// }
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\data\Api.js</definedin>
		[ScriptName("actions")]
		[IntrinsicProperty()]
		public object Actions
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		#endregion
		
		#region Methods
		/// <summary>Returns true if supplied action-name is a valid API action defined in {@link #actions} constants</summary>
		/// <htmlSummary>Returns true if supplied action-name is a valid API action defined in &lt;code&gt;{@link #actions}&lt;/code&gt; constants</htmlSummary>
		/// <definedin>src\data\Api.js</definedin>
		/// <param name="action">Action to test for availability.</param>
		[ScriptName("isAction")]
		public bool IsAction(string action)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Returns the actual CRUD action KEY &quot;create&quot;, &quot;read&quot;, &quot;update&quot; or &quot;destroy&quot; from the supplied action-name. This method is used internally and shouldn&apos;t generally
		/// need to be used directly. The key/value pair of Ext.data.Api.actions will often be identical but this is not necessarily true. A developer can override this naming
		/// convention if desired. However, the framework internally calls methods based upon the KEY so a way of retreiving the the words &quot;create&quot;, &quot;read&quot;, &quot;update&quot; and &quot;destroy&quot; is
		/// required. This method will cache discovered KEYS into the private validActions hash.
		/// </summary>
		/// <definedin>src\data\Api.js</definedin>
		/// <param name="name">The runtime name of the action.</param>
		/// <returns>returns the action-key, or verb of the user-action or null if invalid.</returns>
		[ScriptName("getVerb")]
		public string GetVerb(string name)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Returns true if the supplied API is valid; that is, check that all keys match defined actions
		/// otherwise returns an array of mistakes.
		/// </summary>
		/// <definedin>src\data\Api.js</definedin>
		[ScriptName("isValid")]
		public ext.auto.System_StringArray_Or_System_Boolean IsValid()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Returns true if the supplied verb upon the supplied proxy points to a unique url in that none of the other api-actions
		/// point to the same url. The question is important for deciding whether to insert the &quot;xaction&quot; HTTP parameter within an
		/// Ajax request. This method is used internally and shouldn&apos;t generally need to be called directly.
		/// </summary>
		/// <definedin>src\data\Api.js</definedin>
		/// <param name="proxy"></param>
		/// <param name="verb"></param>
		[ScriptName("hasUniqueUrl")]
		public bool HasUniqueUrl(ext.data.DataProxy proxy, string verb)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// This method is used internally by {@link Ext.data.DataProxy DataProxy} and should not generally need to be used directly.
		/// Each action of a DataProxy api can be initially defined as either a String or an Object. When specified as an object,
		/// one can explicitly define the HTTP method (GET|POST) to use for each CRUD action. This method will prepare the supplied API, setting
		/// each action to the Object form. If your API-actions do not explicitly define the HTTP method, the &quot;method&quot; configuration-parameter will
		/// be used. If the method configuration parameter is not specified, POST will be used.
		/// 
		/// new Ext.data.HttpProxy({
		/// method: &quot;POST&quot;, // &lt;-- default HTTP method when not specified.
		/// api: {
		/// create: &apos;create.php&apos;,
		/// load: &apos;read.php&apos;,
		/// save: &apos;save.php&apos;,
		/// destroy: &apos;destroy.php&apos;
		/// }
		/// });
		///
		/// // Alternatively, one can use the object-form to specify the API
		/// new Ext.data.HttpProxy({
		/// api: {
		/// load: {url: &apos;read.php&apos;, method: &apos;GET&apos;},
		/// create: &apos;create.php&apos;,
		/// destroy: &apos;destroy.php&apos;,
		/// save:...
		/// </summary>
		/// <htmlSummary>
		/// This method is used internally by &lt;tt&gt;{@link Ext.data.DataProxy DataProxy}&lt;/tt&gt; and should not generally need to be used directly.
		/// Each action of a DataProxy api can be initially defined as either a String or an Object. When specified as an object,
		/// one can explicitly define the HTTP method (GET|POST) to use for each CRUD action. This method will prepare the supplied API, setting
		/// each action to the Object form. If your API-actions do not explicitly define the HTTP method, the &quot;method&quot; configuration-parameter will
		/// be used. If the method configuration parameter is not specified, POST will be used.
		/// &lt;pre&gt;&lt;code&gt;
		/// new Ext.data.HttpProxy({
		/// method: &quot;POST&quot;, // &lt;-- default HTTP method when not specified.
		/// api: {
		/// create: &apos;create.php&apos;,
		/// load: &apos;read.php&apos;,
		/// save: &apos;save.php&apos;,
		/// destroy: &apos;destroy.php&apos;
		/// }
		/// });
		///
		/// // Alternatively, one can use the object-form to specify the API
		/// new Ext.data.HttpProxy({
		/// api: {
		/// load: {url: &apos;read.php&apos;, method: &apos;GET&apos;},
		/// create: &apos;create.php&apos;,
		/// destroy: &apos;destroy.php&apos;,
		/// save: &apos;update.php&apos;
		/// }
		/// });
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\data\Api.js</definedin>
		/// <param name="proxy"></param>
		[ScriptName("prepare")]
		public void Prepare(ext.data.DataProxy proxy)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Prepares a supplied Proxy to be RESTful. Sets the HTTP method for each api-action to be one of
		/// GET, POST, PUT, DELETE according to the defined {@link #restActions}.
		/// </summary>
		/// <definedin>src\data\Api.js</definedin>
		/// <param name="proxy"></param>
		[ScriptName("restify")]
		public void Restify(ext.data.DataProxy proxy)
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
	}
}
